<?php

  class Dialog extends Window {
    private $info;  
    private $ok;
    function setInfo($info) {
        $this->info->setTextInternal($info);
    }
    function close() {
        //$this->info->close();
        //$this->ok->close();
        parent::close();
    }
    function actionPerformed($action) {
      if($action['component'] == $this->uuid && $action['action'] == "close") $this->close();  
      if($action['component'] == $this->uuid . '_ok') {
         $this->close();
      }  
    }
    function __construct($uuid,$info="") {
      parent::__construct($uuid);
      $this->info = new Label($uuid . "_info",$info);
      $this->info->setBounds(30,20,260,60);        
      $this->info->setStyle("textAlign","center");
      $this->ok = new Button($uuid . '_ok','OK');
      $this->ok->isolate(true);
      $this->ok->setLocation(100,90);
      $this->add($this->info);
      $this->add($this->ok);      
    }      
  }
?>
